<?php
header("content-type:text/html; charset=utf-8");
$id = $_GET['id'];
$username  = $_POST['username']; 
$project  = $_POST['project'];  
$date  = $_POST['date'];  
$day  = $_POST['day'];  
require("config.php");												//包含数据库连接文件
$sql = "UPDATE addtime SET a_user='$username',a_project='$project',a_date='$date',a_day='$day' WHERE a_id='$id'";
$result=mysql_query($sql);
if($result)
{
	echo '<script>alert("修改成功");location.href="lie.php"</script>';
}else
{
	echo '<script>alert("修改失败");location.href="update.php"</script>';
} 



?>